{template 'common/header'}
<div class='container' style='padding:0 5px 10px;margin:0;width:100%'>
<ul class="nav nav-tabs">
  <li {if $opp == 'mailsetup'}class="active"{/if}><a href="{php echo $this->createWebUrl('mailsetup');}">基本设置</a></li>
  <li {if $opp == 'adminmail'}class="active"{/if}><a href="{php echo $this->createWebUrl('adminmail');}">分组管理</a></li>
  <!-- <li {if $opp == 'mailacode'}class="active"{/if}><a href="{php echo $this->createWebUrl('mailacode');}">通讯录二维码设置</a></li> -->
  <!-- <li {if $opp == 'import'}class="active"{/if}><a href="{php echo $this->createWebUrl('import');}">导入天眼查</a></li> -->
</ul>
</div>
<div class="main">
<form action="" method="post" class="form-horizontal form" enctype="multipart/form-data">

	    <input type="hidden" name="id" value="{$deat['id']}" />
        
		<div class="panel panel-default">

			<div class="panel-heading">

			通讯录设置

			</div>

			<div class="panel-body">
            <div class="form-group">
                    <label class="col-xs-12 col-sm-4 col-md-3 control-label"><span class="require"></span>是否开启通讯录收费</label>
                    <div class="col-sm-9 col-xs-9 col-md-7 col-xs-12">
                    
                  <label class="radio-inline"><input type="radio" onclick="sendtypeshow(1)" name="mail_pay" value="1" {if $deat['mail_pay'] == 1|| $deat['mail_pay']}checked{/if}>开启</label>
                  <label class="radio-inline"><input type="radio" onclick="sendtypeshow(0)" name="mail_pay" value="0" {if $deat['mail_pay'] == 0 }checked{/if}>关闭</label>
                        <div class="help-block">关闭后通讯录不收费，用户免费使用 </div>
                    </div>
                    </div>
                    <div class="form-group model3">
                    <label class="col-xs-12 col-sm-4 col-md-3 control-label"><span class="require"></span>是否开启通讯录审核</label>
                    <div class="col-sm-9 col-xs-9 col-md-7 col-xs-12">
                        <label class="radio-inline"><input type="radio"  name="mail_p" value="0" {if $deat['mail_p'] == 0 || $deat['mail_p']}checked {/if}>开启</label>
                        <label class="radio-inline"><input type="radio"  name="mail_p" value="1" {if $deat['mail_p'] == 1 }checked {/if}>关闭</label>
                        <div class="help-block">关闭后新建通讯录不经审核，用户可直接使用 （开启收费后本项无效）</div>
                    </div>
            </div>
				<div class="form-group model2">
					<label class="col-xs-12 col-sm-3 col-md-3 control-label">免费试用天数</label>
					<div class="col-sm-9 col-xs-9 col-md-7 col-xs-12">
						<input type="text" id='ontrial' name="ontrial" class="form-control" value="{$deat['ontrial']}" />
					</div>
				</div>
               
                <div class="form-group model2">
                    <label class="col-xs-12 col-sm-4 col-md-3 control-label">年费金额（元）:</label>
                    <div class="col-sm-9 col-xs-9 col-md-7 col-xs-12">
                        <input type="text" id="pay_coll" name="pay_coll"  class="form-control" value="{$deat['pay_coll']}"/>
                        <div class="help-block">天数按365天计算</div>
                    </div>
                </div>
                  <div class="form-group">
                    <label class="col-xs-12 col-sm-4 col-md-3 control-label">一个微信号最多创建通讯录的个数:</label>
                    <div class="col-sm-9 col-xs-9 col-md-7 col-xs-12">
                        <input type="text" id="mnumber" name="mnumber"  class="form-control" value="{$deat['mnumber']}"/>
                    </div>
                </div>


		</div>

		<div class="form-group col-sm-12">

			<input type="submit" name="submit" value="提交" class="btn btn-primary col-lg-1" />

			<input type="hidden" name="token" value="{$_W['token']}" />

		</div>

	</form>

</div>
</div>

<script>
    function sendtypeshow(sf) {
        if (sf==0) {
            $(".model2").hide();
			$(".model3").show();
        } else {
            $(".model2").show();
			$(".model3").hide();
        }
    }
    require(['jquery', 'util'], function ($, u) {
        $(function () {
            var mail_pay = "{$deat['mail_pay']}";
            if (mail_pay ==0) {
                $(".model2").hide();
				$(".model3").show();
            } else {
                $(".model2").show();
				$(".model3").hide();
            }
        });
    });
</script>

{template 'common/footer'}
